#!/bin/sh

if [ ! "$(id -u)" -eq 0 ] ; then
    echo "
This script requires root priviledges, use sudo.
"
    exit 1
fi

ETH_ADDRESS=$(/usr/bin/bee init --config /etc/bee/bee.yaml 2>&1 | grep ethereum | cut -d'=' -f6 | tr -d '"')
        echo "
Please make sure there is XDAI and, if required, XBZZ available on the following Ethereum address on Gnosis Chain: $ETH_ADDRESS

Learn how to fund your node by visiting our docs at https://docs.ethswarm.org/docs/installation/fund-your-node

Once your node's wallet has received the funds it will begin joining the Swarm network.

See the docs for more information at https://docs.ethswarm.org/docs/.
        "

chown -R bee:bee /var/lib/bee
